using System.Windows.Data;

namespace jSLCore.Client.Presentation.jBinding.BaseConverters
{
    internal static class ConverterUtility
    {
        public static IValueConverter CreateConverterFromConvertingType(jConvertMode mode)
        {
            switch (mode)
            {
                    case jConvertMode.AsIs: break;
                    case jConvertMode.Currency:
                        return new jCurrencyConverter();
                    case jConvertMode.BinaryToImage:
                        return new jImageSourceConverter();
                    case jConvertMode.ToShortDate:
                        return new jDateTimeToDateConverter();
                    case jConvertMode.SecondsToTimeSpanString:
                        return new jSecondsToTimeSpanString();
                    /*case jConvertMode.FromEnum:
                        return new jEnumConverter();*/
                    case jConvertMode.InvertBoolean:
                        return new jInvertBooleanConverter();
                    case jConvertMode.ToFirstNSymbols:
                    return new jStringToFirstNSymbolsConverter();
                    case jConvertMode.ToShortDateAndTime:
                    return new jFormatDateTimeConverter();
            }
            return null;
        }
    
    }
}